import { IsString, IsOptional, Length, IsNotEmpty } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateMiniuserDto {
  @ApiProperty({
    description: '用户名',
    default: 'string',
  })
  @IsNotEmpty({ message: '用户名不能为空' })
  @Length(1, 20, { message: '用户名长度1-10' })
  @IsString()
  @IsOptional()
  username?: string;

  @ApiProperty({
    description: '头像',
    default: 'string',
  })
  @IsNotEmpty({ message: '头像不能为空' })
  @IsString()
  @IsOptional()
  avatar?: string;
}
